package cn.lg.soar.system.general.entity;

import cn.lg.soar.database.base.entity.BaseEntity;
import cn.lg.soar.system.api.enums.SysConfigTypeEnum;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 系统配置
 * @author luguoxiang
 * @since 2023-07-13
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "SysConfig", description = "")
@TableName("lg_sys_config")
public class SysConfig extends BaseEntity {

    private static final long serialVersionUID = -7233374658545313689L;
    @ExcelProperty(value = "编码")
    @ApiModelProperty(value = "编码(主键)")
    @TableId(type = IdType.INPUT)
    private String code;

    @ExcelProperty(value = "名称")
    @ApiModelProperty(value = "名称")
    private String name;

    @ExcelProperty(value = "值")
    @ApiModelProperty(value = "值")
    private String value;

    @ExcelProperty(value = "类型")
    @ApiModelProperty(value = "类型")
    private SysConfigTypeEnum type;

    @ApiModelProperty("备注")
    private String remark;

    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Serializable primaryKey() {
        return this.code;
    }

}
